package com.ad.platform.api;

import com.ad.payload.vo.PfCategoryVo;
import com.ad.platform.service.IPfCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 小程序 访问接口  类目信息
 */
@RestController
@RequestMapping("/pfCategoryApi")
public class PfCategoryApi {

    @Autowired
    private IPfCategoryService iPfCategoryService;

    /**
     * 查询数据列表 20条 (小程序首页展示)
     * @param
     * @return
     */
    @PostMapping("/client/noAuth/listPfCategory")
    public List<PfCategoryVo> listPfCategory(){
        List<PfCategoryVo> pfCategoryVoList =
                iPfCategoryService.selectListForMini();
        return pfCategoryVoList;

    }

    /**
     * 首页屏蔽行业列表 0不屏蔽 1屏蔽
     * */
    @PostMapping("/client/noAuth/isDisplayCategoryList")
    public String isDisplayCategoryList(){
        return iPfCategoryService.isDisplayCategoryList();
    }

}
